#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/multi_point.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/geometries/adapted/boost_tuple.hpp>

namespace bg = boost::geometry;
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian);

double getHullArea(std::vector<double> x, std::vector<double> y) {
  typedef boost::tuple<double,double> point;
  typedef bg::model::multi_point<point> points;
  points p;
  for (size_t i=0; i<x.size(); i++) {
    bg::append(p, point(x[i],y[i]));
  }
  bg::model::polygon hull;
  bg::convex_hull(p, hull);
  return bg::area(hull);
}

int main(int argc, char const *argv[])
{
    getHullArea();
    return 0;
}